# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Partners.V2.Model.CompanyRelation do
  @moduledoc """
  A CompanyRelation resource representing information about a user&#39;s affiliation and standing with a company in Partners.

  ## Attributes

  - address (String.t): The primary address for this company. Defaults to: `null`.
  - badgeTier (String.t): Whether the company is a Partner. Defaults to: `null`.
    - Enum - one of [BADGE_TIER_NONE, BADGE_TIER_REGULAR, BADGE_TIER_PREMIER]
  - companyAdmin (boolean()): Indicates if the user is an admin for this company. Defaults to: `null`.
  - companyId (String.t): The ID of the company. There may be no id if this is a pending company.5 Defaults to: `null`.
  - creationTime (DateTime.t): The timestamp of when affiliation was requested. @OutputOnly Defaults to: `null`.
  - internalCompanyId (String.t): The internal company ID. Only available for a whitelisted set of api clients. Defaults to: `null`.
  - isPending (boolean()): The flag that indicates if the company is pending verification. Defaults to: `null`.
  - logoUrl (String.t): A URL to a profile photo, e.g. a G+ profile photo. Defaults to: `null`.
  - managerAccount (String.t): The AdWords manager account # associated this company. Defaults to: `null`.
  - name (String.t): The name (in the company&#39;s primary language) for the company. Defaults to: `null`.
  - phoneNumber (String.t): The phone number for the company&#39;s primary address. Defaults to: `null`.
  - primaryAddress (Location): The primary location of the company. Defaults to: `null`.
  - primaryCountryCode (String.t): The primary country code of the company. Defaults to: `null`.
  - primaryLanguageCode (String.t): The primary language code of the company. Defaults to: `null`.
  - resolvedTimestamp (DateTime.t): The timestamp when the user was approved. @OutputOnly Defaults to: `null`.
  - segment ([String.t]): The segment the company is classified as. Defaults to: `null`.
    - Enum - one of 
  - specializationStatus ([SpecializationStatus]): The list of Google Partners specialization statuses for the company. Defaults to: `null`.
  - state (String.t): The state of relationship, in terms of approvals. Defaults to: `null`.
    - Enum - one of [USER_COMPANY_REATION_STATE_NONE_SPECIFIED, USER_COMPANY_RELATION_STATE_AWAIT_EMAIL, USER_COMPANY_RELATION_STATE_AWAIT_ADMIN, USER_COMPANY_RELATION_STATE_APPROVED]
  - website (String.t): The website URL for this company. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :address => any(),
          :badgeTier => any(),
          :companyAdmin => any(),
          :companyId => any(),
          :creationTime => DateTime.t(),
          :internalCompanyId => any(),
          :isPending => any(),
          :logoUrl => any(),
          :managerAccount => any(),
          :name => any(),
          :phoneNumber => any(),
          :primaryAddress => GoogleApi.Partners.V2.Model.Location.t(),
          :primaryCountryCode => any(),
          :primaryLanguageCode => any(),
          :resolvedTimestamp => DateTime.t(),
          :segment => list(any()),
          :specializationStatus => list(GoogleApi.Partners.V2.Model.SpecializationStatus.t()),
          :state => any(),
          :website => any()
        }

  field(:address)
  field(:badgeTier)
  field(:companyAdmin)
  field(:companyId)
  field(:creationTime, as: DateTime)
  field(:internalCompanyId)
  field(:isPending)
  field(:logoUrl)
  field(:managerAccount)
  field(:name)
  field(:phoneNumber)
  field(:primaryAddress, as: GoogleApi.Partners.V2.Model.Location)
  field(:primaryCountryCode)
  field(:primaryLanguageCode)
  field(:resolvedTimestamp, as: DateTime)
  field(:segment, type: :list)
  field(:specializationStatus, as: GoogleApi.Partners.V2.Model.SpecializationStatus, type: :list)
  field(:state)
  field(:website)
end

defimpl Poison.Decoder, for: GoogleApi.Partners.V2.Model.CompanyRelation do
  def decode(value, options) do
    GoogleApi.Partners.V2.Model.CompanyRelation.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Partners.V2.Model.CompanyRelation do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
